<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="content">
    <p>This is a <strong>paragraph</strong> with a list following it. </p>
    <ul>
        <li>Item 1</li>
        <li>Item 2</li>
        <li>Item 3</li>
    </ul>
</div>
<script>
    /*
        1. innerText
            - 不包括自己,都是子树
    /*
        This is a paragraph with a list following it.

        Item 1
        Item 2
        Item 3
     */
    const theDom = document.querySelector('#content')
    console.log(theDom.innerText)
    
    /*
        2.outerText
            - 包括自己
     */
    console.log(theDom.outerText) // 和上面一样
    theDom.outerText = 'Hello world' // 把<div id=content>这个结点换成Hello world了
</script>
</body>
</html>